Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove max_cache_age parameter (PP-1962) #141

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

jonathangreen
Copy link
Member

Description

The code was doing some questionable things to add the max_cache_age parameter to URLs. In PP-1962 I found this is causing some issues. We could do some work to fix up how we include the parameter in URLs, but since we are no longer using this parameter in the CM, it doesn't seem worth including it.

Motivation and Context

Issues I was seeing with this code:

  • max_cache_age would get repeatedly included creating urls like this: http://localhost:6500/admin/web/collection/GA0011%3Fmax_cache_age%3D0%26max_cache_age%3D0%26max_cache_age%3D0%26max_cache_age%3D0/book/GA0011%2FISBN%2F9780593457580/tab/lists 🤮
  • Clicking the Create New List button in the admin UI would go to a URL like this http://localhost:6500/admin/web/lists/GA0011?max_cache_age=0&max_cache_age=0&max_cache_age=0&max_cache_age=0/create which isn't a routable URL so it resulted in a white screen. The URL we wanted was http://localhost:6500/admin/web/lists/GA0011/create.
  • I saw a couple other weird URL generation quirks while looking at this that I didn't note down. But removing the max_cache_age stuff fixed them

It seems like we might want to do some refactoring work to how the admin UI is generating URLs in the future, but this at least solves the issues I was seeing with the work lane editor screens.

How Has This Been Tested?

  • Tested locally
  • Running unit tests

Checklist:

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@jonathangreen jonathangreen added the bug Something isn't working label Nov 22, 2024
@jonathangreen jonathangreen requested a review from a team November 22, 2024 18:46
@jonathangreen jonathangreen changed the title Remove max_cache_age parameter Remove max_cache_age parameter (PP-1962) Nov 22, 2024
Copy link
Contributor

@tdilauro tdilauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! No más max_cache! 🎉

@jonathangreen jonathangreen merged commit b6ad96f into main Nov 22, 2024
1 check passed
@jonathangreen jonathangreen deleted the bugfix/max-cache-age branch November 22, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants